<html>
<head><meta charset="utf-8"><title>evcxr uses rust-analyzer · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/evcxr.20uses.20rust-analyzer.html">evcxr uses rust-analyzer</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="238625343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/evcxr%20uses%20rust-analyzer/near/238625343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/evcxr.20uses.20rust-analyzer.html#238625343">(May 13 2021 at 14:04)</a>:</h4>
<p>I just found out through a linked issue that evcxr <a href="https://github.com/google/evcxr/blob/main/evcxr/src/rust_analyzer.rs">uses RA</a> through the autopublished crates. Didn't know this, interesting <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="238625839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/evcxr%20uses%20rust-analyzer/near/238625839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/evcxr.20uses.20rust-analyzer.html#238625839">(May 13 2021 at 14:08)</a>:</h4>
<p>I found out about this yesterday while updating it, pretty cool!</p>



<a name="238625879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/evcxr%20uses%20rust-analyzer/near/238625879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/evcxr.20uses.20rust-analyzer.html#238625879">(May 13 2021 at 14:09)</a>:</h4>
<p>Looks like it works best in jupyter</p>



<a name="238629672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/evcxr%20uses%20rust-analyzer/near/238629672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/evcxr.20uses.20rust-analyzer.html#238629672">(May 13 2021 at 14:35)</a>:</h4>
<p>Evcxr used to parse rustc error messages to get the type of locals. When rustc started shortening type paths in error messages, evcxr has to switch to rust-analyzer for this.</p>



<a name="238631640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/evcxr%20uses%20rust-analyzer/near/238631640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/evcxr.20uses.20rust-analyzer.html#238631640">(May 13 2021 at 14:49)</a>:</h4>
<p>that and completion, apparently</p>



<a name="238681648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/evcxr%20uses%20rust-analyzer/near/238681648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> maahl <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/evcxr.20uses.20rust-analyzer.html#238681648">(May 13 2021 at 21:08)</a>:</h4>
<p>the author of evcxr mentions why he switched to rust-analyzer <a href="https://blog.abor.dev/p/evcxr">here</a>  (search for "I switched to using rust-analyzer about six months ago"), there's some interesting feedback there</p>



<a name="238685078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/evcxr%20uses%20rust-analyzer/near/238685078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/evcxr.20uses.20rust-analyzer.html#238685078">(May 13 2021 at 21:37)</a>:</h4>
<p>What exactly is it using type information for? To declare a return type?</p>



<a name="238685953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/evcxr%20uses%20rust-analyzer/near/238685953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/evcxr.20uses.20rust-analyzer.html#238685953">(May 13 2021 at 21:46)</a>:</h4>
<p>No, to store and load variables across multiple inputs.</p>



<a name="238686057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/evcxr%20uses%20rust-analyzer/near/238686057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/evcxr.20uses.20rust-analyzer.html#238686057">(May 13 2021 at 21:47)</a>:</h4>
<p>For example</p>
<div class="codehilite"><pre><span></span><code>let foo = 42;
</code></pre></div>
<div class="codehilite"><pre><span></span><code>println!(&quot;{}&quot;, foo); // need to know the type of foo to load it correctly from the map of stored variables
</code></pre></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>